/**
 * 
 */
package com.scpii.universal.hibernate.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.scpii.universal.constant.GenericConstants;
import com.scpii.universal.hibernate.dao.SystemCateDao;
import com.scpii.universal.hibernate.entity.SystemCateTab;

/**
 * universalWeb
 * @author liuhj
 * 2012-7-20下午01:56:02
 */
@Repository
public class SystemCateDaoImpl extends BaseDaoImpl<SystemCateTab, Integer> implements
		SystemCateDao {

	@SuppressWarnings("unchecked")
	@Override
	public List<SystemCateTab> getAll() {
		String hql = "select new SystemCateTab(s.intSysCateId,s.intParentSysCateId,s.varSysCateName) "
				+ "from SystemCateTab s where s.intDeleteSign=?";
		return getHibernateTemplate().getSessionFactory().getCurrentSession()
				.createQuery(hql).setParameter(0,
						GenericConstants.DELETE_SIGN_EXIST).list();
	}

}
